package com.lightboat.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 物流状态
 *
 * @author lightboat
 */
@Getter
@AllArgsConstructor
public enum CrmLogisticsStatus {
    PENDING_SHIPMENT(0, "待发货"),
    SIGNED(1, "已签收"),
    REFUSAL_SIGN_RECEIPT(2, "拒绝签收"),
    SHIPPED(3, "已发货");
    private final Integer code;
    private final String message;

    public CrmLogisticsStatus getByCode(Integer code) {
        for (CrmLogisticsStatus value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }
}
